﻿''' <summary>
''' Class wrapper for the results of the trac qry
''' </summary>
''' <remarks></remarks>
Public Class Track
    Private _description As String
    Private _genre As String
    Private _isrc As String
    Private _permalink As String
    Private _purchaseurl As String
    Private _release As String
    Private _sharing As TrackVisability
    Private _uri As String
    Private _title As String
    Private _permalinkurl As String
    Private _playbackcount As String
    Private _downloadcount As String
    Private _commentcount As String
    Private _artworkurl As String
    Private _waveformurl As String
    Private _streamurl As String
    Private _downloadurl As String
    Private _bpm As String
    Private _createdate As Date
    Private _downloadable As Boolean
    Private _duration As Integer
    Private _id As Integer
    Private _releaseday As Integer
    Private _releasemonth As Integer
    Private _releaseyear As Integer
    Private _streamable As Boolean
    Private _userid As Integer
    Private _user As User
    Public Enum TrackVisability
        [Public]
        [Private]
    End Enum
    Public ReadOnly Property DurationSec() As Single
        Get
            Return Me.Duration / 60
        End Get
    End Property
    Public ReadOnly Property DurationMins() As Integer
        Get
            Return Me.Duration / 60
        End Get
    End Property
    Public Property user() As User
        Get
            Return _user
        End Get
        Set(ByVal value As User)
            _user = value
        End Set
    End Property
    Public Property Artworkurl() As String
        Get
            Return _artworkurl
        End Get
        Set(ByVal value As String)
            _artworkurl = value
        End Set
    End Property
    Public Property Bpm() As String
        Get
            Return _bpm
        End Get
        Set(ByVal value As String)
            _bpm = value
        End Set
    End Property
    Public Property Commentcount() As String
        Get
            Return _commentcount
        End Get
        Set(ByVal value As String)
            _commentcount = value
        End Set
    End Property
    Public Property Createdate() As Date
        Get
            Return _createdate
        End Get
        Set(ByVal value As Date)
            _createdate = value
        End Set
    End Property
    Public Property Description() As String
        Get
            Return _description
        End Get
        Set(ByVal value As String)
            _description = value
        End Set
    End Property
    Public Property Downloadable() As Boolean
        Get
            Return _downloadable
        End Get
        Set(ByVal value As Boolean)
            _downloadable = value
        End Set
    End Property
    Public Property Downloadcount() As String
        Get
            Return _downloadcount
        End Get
        Set(ByVal value As String)
            _downloadcount = value
        End Set
    End Property
    Public Property Downloadurl() As String
        Get
            Return _downloadurl
        End Get
        Set(ByVal value As String)
            _downloadurl = value
        End Set
    End Property
    Public Property Duration() As Integer
        Get
            Return _duration
        End Get
        Set(ByVal value As Integer)
            _duration = value
        End Set
    End Property
    Public Property Genre() As String
        Get
            Return _genre
        End Get
        Set(ByVal value As String)
            _genre = value
        End Set
    End Property
    Public Property Id() As Integer
        Get
            Return _id
        End Get
        Set(ByVal value As Integer)
            _id = value
        End Set
    End Property
    Public Property Isrc() As String
        Get
            Return _isrc
        End Get
        Set(ByVal value As String)
            _isrc = value
        End Set
    End Property
    Public Property Permalink() As String
        Get
            Return _permalink
        End Get
        Set(ByVal value As String)
            _permalink = value
        End Set
    End Property
    Public Property Permalinkurl() As String
        Get
            Return _permalinkurl
        End Get
        Set(ByVal value As String)
            _permalinkurl = value
        End Set
    End Property
    Public Property Playbackcount() As String
        Get
            Return _playbackcount
        End Get
        Set(ByVal value As String)
            _playbackcount = value
        End Set
    End Property
    Public Property Purchaseurl() As String
        Get
            Return _purchaseurl
        End Get
        Set(ByVal value As String)
            _purchaseurl = value
        End Set
    End Property
    Public Property Release() As String
        Get
            Return _release
        End Get
        Set(ByVal value As String)
            _release = value
        End Set
    End Property
    Public Property Releaseday() As Integer
        Get
            Return _releaseday
        End Get
        Set(ByVal value As Integer)
            _releaseday = value
        End Set
    End Property
    Public Property Releasemonth() As Integer
        Get
            Return _releasemonth
        End Get
        Set(ByVal value As Integer)
            _releasemonth = value
        End Set
    End Property
    Public Property Releaseyear() As Integer
        Get
            Return _releaseyear
        End Get
        Set(ByVal value As Integer)
            _releaseyear = value
        End Set
    End Property
    Public Property Sharing() As TrackVisability
        Get
            Return _sharing
        End Get
        Set(ByVal value As TrackVisability)
            _sharing = value
        End Set
    End Property
    Public Property Streamable() As Boolean
        Get
            Return _streamable
        End Get
        Set(ByVal value As Boolean)
            _streamable = value
        End Set
    End Property
    Public Property Streamurl() As String
        Get
            Return _streamurl
        End Get
        Set(ByVal value As String)
            _streamurl = value
        End Set
    End Property
    Public Property Title() As String
        Get
            Return _title
        End Get
        Set(ByVal value As String)
            _title = value
        End Set
    End Property
    Public Property Uri() As String
        Get
            Return _uri
        End Get
        Set(ByVal value As String)
            _uri = value
        End Set
    End Property
    Public Property User1() As Object
        Get
            Return user
        End Get
        Set(ByVal value As Object)
            user = value
        End Set
    End Property
    Public Property Userid() As Integer
        Get
            Return _userid
        End Get
        Set(ByVal value As Integer)
            _userid = value
        End Set
    End Property
    Public Property Waveformurl() As String
        Get
            Return _waveformurl
        End Get
        Set(ByVal value As String)
            _waveformurl = value
        End Set
    End Property

End Class
Public Class Tracks
    Inherits ObjectModel.Collection(Of Track)
End Class